package com.mrzhou.msg.feign;

import com.mrzhou.core.tool.api.R;
import com.mrzhou.msg.feign.client.IMsgClient;
import com.mrzhou.msg.service.IMailService;
import com.mrzhou.msg.vo.req.ValidMailPhoneReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MsgClient implements IMsgClient {

    @Autowired
    private IMailService mailService;

    @Override
    @PostMapping(VALID_MAIL_CODE)
    public R<String> validMailCode(@Validated ValidMailPhoneReq req) {
        return mailService.validMailCode(req);
    }

}
